<template>
    <cartHerder></cartHerder>
    <cartMain></cartMain>
    <van-submit-bar :price="totalMoney * 100"  button-text="提交订单" @submit="onSubmit">
        <van-checkbox :checked="selectAll" @click="all">全选</van-checkbox>
        <template #tip>
            你的收货地址不支持配送, <span @click="onClickLink">修改地址</span>
        </template>
    </van-submit-bar>
</template>
<script setup lang="ts">
import { onMounted } from 'vue';
import { showToast } from 'vant';
import { storeToRefs } from 'pinia';
import { useCart } from '../stores/carts'
import cartHerder from '../ShoppingCart/cartHerder.vue'
import cartMain from '../ShoppingCart/cartMain.vue'

const store = useCart()
const { selectAll , money ,totalMoney} = storeToRefs(store)

const all = async () =>{
    await store.qsBtn()
    
}

const onSubmit = () => showToast('点击按钮');
const onClickLink = () => showToast('修改地址');
</script>